#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
ll a[4][4];
void solve()
{
    for (ll i = 1; i <= 3;i++)
    {
        for(ll j=1;j<=3;j++)
        {
            cin >> a[i][j];
        }
    }
    dfs(1, 1);
}
int main()
{
    int t = 1;
   // cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
